home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_11
/
dugger
/
mutex.h
< prev
Wrap
C/C++ Source or Header
|
1995-09-05
|
671b
|
27 lines
/*
Module Header : mutex.h
Function: Used at the top of nonreentrant functions, this limits
access to function to one thread at a time.
*/
#define INCL_DOSSEMAPHORES
#include <os2.h>
class mutex {
protected:
char *sem_name; // name of semaphore
HMTX handle; // semaphore handle
APIRET rc; // API return code
private:
mutex(); // keeps user from using this
public:
mutex( const char const* name ); // create sem_block strcture
~mutex(); // auto-destructor
};